<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <textarea id="mytextarea">Hello,World!</textarea>
    <button>获取富文本的内容</button>

    <script src="../libs/tinymce_5.5.1/tinymce.min.js"></script>
    <script>
        tinymce.init({
            selector: '#mytextarea',
            language: 'zh_CN',
        });
        document.querySelector('button').onclick = function () {
            let cnt = tinyMCE.editors["mytextarea"].getContent()
            console.log(cnt);
        }
    </script>
</body>

</html>